//
//  ZYLUserBaseViewController.m
//  Cartoon
//
//  Created by dllo on 15/7/13.
//  Copyright (c) 2015年 dllo. All rights reserved.
//
#import "Define.h"
#import "ZYLUserBaseViewController.h"

@interface ZYLUserBaseViewController ()
@property (nonatomic, retain) UIView *headerView;
@property (nonatomic, retain) UIButton *backBtn;
@property (nonatomic, retain) UILabel *headerUserName;

@property (nonatomic, retain) UIImageView *backgroundImageView;
@property (nonatomic, retain) UIImageView *userImage;
@property (nonatomic, retain) UILabel *userName;
@property (nonatomic, retain) UILabel *singleCollectionCount;
@property (nonatomic, retain) UILabel *speacialCollectionCount;

@property (nonatomic, retain) UIView *collectClassView;
@property (nonatomic, retain) UIButton *singleCollectionBtn;
@property (nonatomic, retain) UIButton *speacialCollectionBtn;

@property (nonatomic, retain) UITableView *singleCollectionTableView;
@property (nonatomic, retain) UITableView *speacialCollectionTableView;
@end

@implementation ZYLUserBaseViewController

- (void)dealloc
{
    
    [_headerView release];
    [_backBtn release];
    [_headerUserName release];
    
    [_backgroundImageView release];
    [_userImage release];
    [_userName release];
    [_singleCollectionCount release];
    [_speacialCollectionCount release];
    
    [_collectClassView release];
    [_singleCollectionBtn release];
    [_speacialCollectionBtn release];
    
    [_singleCollectionTableView release];
    [_speacialCollectionTableView release];
    
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBar.hidden = YES;
    self.headerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 60)] autorelease];
    self.headerView.backgroundColor = [UIColor redColor];
    [self.view addSubview:self.headerView];
    
    self.headerUserName = [[[UILabel alloc] initWithFrame:CGRectMake(55, 25, 150, 30)] autorelease];
    self.headerUserName.text = @"Colourfulmaster";
    self.headerUserName.textColor = [UIColor whiteColor];
    [self.headerView addSubview:self.headerUserName];
    
    
    self.backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    self.backBtn.frame = CGRectMake(10, 25, 30, 30);
    [self.backBtn setImage:[UIImage imageNamed:@"iconfont-fanhui-2.png"] forState:UIControlStateNormal];
    [self.headerView addSubview:self.backBtn];
    
    self.backgroundImageView = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 250)] autorelease];
    self.backgroundImageView.backgroundColor = [UIColor lightGrayColor];
    [self.view addSubview:self.backgroundImageView];
    
    self.userImage = [[[UIImageView alloc] initWithFrame:CGRectMake(25, 150, 135, 135)] autorelease];
    self.userImage.backgroundColor = [UIColor blueColor];
    self.userImage.layer.cornerRadius = self.userImage.frame.size.height / 2;
    [self.view addSubview:self.userImage];
    self.userName = [[[UILabel alloc] initWithFrame:CGRectMake(25, 300, 200, 25)] autorelease];
    self.userName.text = @"Colourfulmaster";
    self.userName.font = [UIFont systemFontOfSize:21];
    [self.view addSubview:self.userName];
    
    self.singleCollectionCount = [[[UILabel alloc] initWithFrame:CGRectMake(self.userName.frame.origin.x - 15, 340, 100, 15)] autorelease];
    self.singleCollectionCount.text = @"21个单篇收藏";
    self.singleCollectionCount.font = [UIFont systemFontOfSize:13];
    self.singleCollectionCount.textColor = [UIColor lightGrayColor];
    self.singleCollectionCount.textAlignment = NSTextAlignmentRight;
    [self.view addSubview:self.singleCollectionCount];
    
    self.speacialCollectionCount = [[[UILabel alloc] initWithFrame:CGRectMake(self.userName.frame.origin.x + 90, 340, 100, 15)] autorelease];
    self.speacialCollectionCount.text = @"| 64个专题收藏";
    self.speacialCollectionCount.font = [UIFont systemFontOfSize:13];
    self.speacialCollectionCount.textColor = [UIColor lightGrayColor];
    [self.view addSubview:self.speacialCollectionCount];
    
    
    [self.view bringSubviewToFront:self.headerView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
